package com.yfp.operation.service;

import com.yfp.operation.domain.LotteryRecords;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yfp.operation.domain.dto.GrantRepertoryDTO;
import com.yfp.operation.domain.dto.LotteryListDTO;
import com.yfp.operation.domain.dto.participationInfoDTO;
import com.yfp.operation.domain.vo.*;
import com.yfp.operation.domain.vo.*;

import java.util.List;

/**
* @author admin
* @description 针对表【lottery_records(抽奖主表)】的数据库操作Service
* @createDate 2024-12-30 10:00:06
*/
public interface LotteryRecordsService extends IService<LotteryRecords> {

    /**
     * 新增抽奖活动
     * @param lotteryRecords
     */
    void addLottery(LotteryRecords lotteryRecords);

    /**
     * 抽奖活动列表
     * @param lotteryListDTO
     * @return
     */
    List<LotteryListVO> lotteryList(LotteryListDTO lotteryListDTO);

    /**
     * 抽奖活动列表数据补全
     * @param list
     * @return
     */
    List<LotteryListVO> lotteryListComplement(List<LotteryListVO> list);

    /**
     * 参与详情
     * @param participationInfoDTO
     * @return
     */
    List<ParticipationVO> participation(participationInfoDTO participationInfoDTO);

    /**
     *
     * @param clientId
     * @return
     */
    List<PrizeListVO> prizeList(String clientId, Long lotteryId);

    /**
     * 参与详情
     * @param lotteryId
     * @param positionName
     * @return
     */
    ParticipationInfoVO participationInfo(Long lotteryId, String positionName);

    /**
     * 参与点位数据
     * @param lotteryId
     * @param positionName
     * @return
     */
    List<participationPositionDataVO> participationPositionData(Long lotteryId, String positionName);

    /**
     * 库存发放详情
     * @param grantRepertoryDTO
     * @return
     */
    List<PrizeVO> grantRepertory(GrantRepertoryDTO grantRepertoryDTO);

    /**
     * 根据id获取抽奖活动
     * @param id
     * @return
     */
    LotteryRecords selectById(Long id);

    /**
     * 修改抽奖活动
     * @param lotteryRecords
     * @return
     */
    void updateLottery(LotteryRecords lotteryRecords);

    /**
     * 增加抽奖次数
     * @param clientId
     * @param price
     */
    void lotteryCount(String clientId, String price ,String cityName);

    Boolean isUnderway(String cityName);

    /**
     * 检测并更新所有抽奖活动状态
     */
    void checkLotteryAndUpdateAllStatus();


}
